package com.axxc.jpa.pattendegign.proxy;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

/**
 * @ClassName DishProxy
 * @Description //TODO 请描述该类的作用
 * @author xxc
 * @data 2018年9月16日上午12:25:31
 * @see {@link http://gitee.com/biuabiu/ }
 */
public class DishProxy implements InvocationHandler {

	public DishProxy(Dish dish) {
		super();
		this.dish = dish;
	}

	private Dish dish;

	@Override
	public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
		System.out.println("执行前");
		Object invoke = method.invoke(dish, args);
		System.out.println("执行后");

		return invoke;
	}

}
